package com.cq.cqmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cq.common.utils.PageUtils;
import com.cq.cqmall.product.entity.AttrEntity;
import com.cq.cqmall.product.vo.AttrGroupRelationVO;
import com.cq.cqmall.product.vo.AttrRespVO;
import com.cq.cqmall.product.vo.AttrVO;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author 程崎
 * @email 2972084238@email.com
 * @date 2022-08-29 01:53:20
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVO attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catlogId, String type);

    AttrRespVO getAttrInfoById(Long attrId);

    void updateAttrById(AttrVO attr);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(List<AttrGroupRelationVO> vos);

    PageUtils getNoRelationAttr(Long attrgroupId, Map<String, Object> params);

    /**
     * 在指定的所有属性集合里跳出检索属性
     *
     * @param attrIds attr id
     * @return {@link List}<{@link Long}>
     */
    List<Long> selectSearchAttrs(List<Long> attrIds);
}

